package com.danico.danicoproject.tweenaccessors;

import aurelienribon.tweenengine.TweenAccessor;

import com.danico.danicoproject.skills.Weapon;

public class WeaponAccessor implements TweenAccessor<Weapon> {
	
	public static final int ROTATION = 1;
    public static final int POSITION_XY = 2;
	
	@Override
	public int getValues(Weapon target, int tweenType, float[] returnValues) {
	    switch (tweenType) {
        case ROTATION:
            returnValues[0] = target.getSprite().getRotation();
            return 1;
        case POSITION_XY:
            returnValues[0] = target.getPosition().x;
            returnValues[1] = target.getPosition().y;;
            return 2;
        default: assert false; return -1;
    
	    }

	}
	@Override
	public void setValues(Weapon target, int tweenType, float[] newValues) {
	    switch (tweenType) {
        case ROTATION:
        	target.getSprite().setRotation(newValues[0]);
        default: assert false; break;
    }

		
	}
}
